<?php
/* @var $this PageLocationMappingController */
/* @var $model PageLocationMapping */
/* @var $form CActiveForm */
?>

<div class="form ml34">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'page-location-mapping-form',
	'enableAjaxValidation'=>false,
)); 

 if (!empty($page_id))
		$model->page_id = $page_id;
?>

	<div class="row">Fields with <span class="required">*</span> are required.</div>

	<div class="row"><?php echo $form->errorSummary($model); ?></div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'page_id'); ?>
		<?php echo $form->dropDownList($model,'page_id',CHtml::listData(PageMaster::getList('ALL'), 'page_id', 'page_name'),array('empty'=>'Select Page')); ?>
		<?php echo $form->error($model,'page_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'location_name'); ?>
		<?php echo $form->textField($model,'location_name',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'location_name'); ?>
	</div>

	<div class="row form-actions">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array('class' => 'btn btn-primary')); ?>
		<?php echo CHtml::button('Cancel', array('submit' => ApplicationConfig::getURL("", "pageLocationMapping", "admin",array('id'=>$_GET['id'])),'class' => 'btn btn-primary')); ?>
		
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->